package com.oem.fragment.model.order;

import java.math.BigDecimal;
import java.time.LocalDateTime;

public class CreateOrderDTO {

    Long mediaFileId;
    BigDecimal budget;
    Integer priority;
    LocalDateTime startTime;
    LocalDateTime endTime;
    String remark;
    StrategyDTO strategy;

    public CreateOrderDTO(Long mediaFileId, BigDecimal budget, Integer priority,
                          LocalDateTime startTime, LocalDateTime endTime,
                          String remark, StrategyDTO strategy) {
        this.mediaFileId = mediaFileId;
        this.budget = budget;
        this.priority = priority;
        this.startTime = startTime;
        this.endTime = endTime;
        this.remark = remark;
        this.strategy = strategy;
    }

    public static class StrategyDTO {
        String targetRegions;
        String targetDevices;
        String userTags;
        BigDecimal dailyBudgetLimit;
        Integer impressionLimit;
        Integer clickLimit;

        public StrategyDTO(String targetRegions, String targetDevices, String userTags,
                           BigDecimal dailyBudgetLimit, Integer impressionLimit, Integer clickLimit) {
            this.targetRegions = targetRegions;
            this.targetDevices = targetDevices;
            this.userTags = userTags;
            this.dailyBudgetLimit = dailyBudgetLimit;
            this.impressionLimit = impressionLimit;
            this.clickLimit = clickLimit;
        }
    }
}

